
/*
Spinning Tetraeder

This config was created by Thomas Geier (ziggystar@gmx.de), who made the programming and Aaron Pinsker, who had the idea for this.

It shows a spinning tetraeder
Yes, I know, it doesn't use the right perspective
*/



Aspc= "1" ,	//We want the tetraeder to look like one


/*
The following A0-A11 are the coordinations (vectors) of the four tetraeder corners
Change these, and the tetraeder won't have even side lengths or won't be rotated around the center
The coordinates of point 1 are (A0/A1/A2)
*/

A0="0",		 	//Point 1 x,y,z
A1=".54",
A2="0",

A3="-.5",		//Point 2
A4="-.28",
A5="-.29",

A6=".5",			//Point 3
A7="-.28",
A8="-.29",

A9="0",	  	//Point4
A10="-.28",
A11=".58",

//Wanna change the tetraeders size? Do this here:

A12="1",			//The size


/*
The rotation speed for two axis, x and y. I thought this would be enough, because adding z rotation would make the terms longer and more difficult for me to calculate(I use pen and paper). If you need z rotation ask me.
You can insert functions here. Eg. sin(t), although I don't know what will happen, since it will be multiplicated with time
*/

B0="0.001*( sin(t * .7 ) + 2 * cos( t * .4 ) )",		  	// Speed of rotation around x
B1="0.001*cos(t*.5)",		// Speed of rotation around y


//These are the x,y(screen) coordinates of the already rotated points
//The formulae have been created using matrix multiplication

B2="A0*cos(t*B0)+A2*sin(t*B0)",				//P1
B3="A1*cos(t*B1)-sin(t*B1)*(A2*cos(B0*t)-A0*sin(B0*t))",				

B4="A3*cos(t*B0)+A5*sin(t*B0)",				//P2
B5="A4*cos(t*B1)-sin(t*B1)*(A5*cos(B0*t)-A3*sin(B0*t))",

B6="A6*cos(t*B0)+A8*sin(t*B0)",				//P3
B7="A7*cos(t*B1)-sin(t*B1)*(A8*cos(B0*t)-A6*sin(B0*t))",

B8="A9*cos(t*B0)+A11*sin(t*B0)",				//P4
B9="A10*cos(t*B1)-sin(t*B1)*(A11*cos(B0*t)-A9*sin(B0*t))",

//These are two switches, I use to draw lines from point a to point b
//Only one of these is 1, while the other is 0 for different s
//I apply the size here also!
//If you want the size to change during the script runs, replace A12 by functions. Eg. sin(t). 

C0="pos(sgn(.5-s))*A12",
C1="pos(sgn(-.5+s))*A12",


//And the following lines draw the lines

X0="C0*B2+C1*B4",		//P1-P2	(The line connecting these points)
Y0="C0*B3+C1*B5",

X1="C0*B2+C1*B6",		//P1-P3	(The line connecting these points)
Y1="C0*B3+C1*B7",

X2="C0*B2+C1*B8",		//P1-P4	(The line connecting these points)
Y2="C0*B3+C1*B9",

X3="C0*B4+C1*B6",		//P2-P3	(The line connecting these points)
Y3="C0*B5+C1*B7",

X4="C0*B4+C1*B8",		//P2-P4	(The line connecting these points)
Y4="C0*B5+C1*B9",

X5="C0*B6+C1*B8",		//P3-P4	(The line connecting these points)
Y5="C0*B7+C1*B9",


Pen="1",	//Only use one color

Stps="2",	//We only need two steps for starting and ending point of each drawn line

LWdt="1",	//The line width

ConB=1,		//Let G-Force draw the lines (connect the two points)


Vers=100
